package club.gskj.gulimall.shoppingcart.feign;

import club.gskj.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品远程调用服务
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 根据id 获取 sku信息
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R getSkuinfoById(@PathVariable("skuId") Long skuId);

    /***
     *  根据 skuId 获取对应的 销售属性列表
     */
    @GetMapping("/product/skusaleattrvalue/stirnglist/{skuId}")
    public List<String> getSkuSaleAttrListForString(@PathVariable("skuId") Long skuId);

    /***
     * 根据skuid获取商品价格
     * @param skuId
     */
    @GetMapping("product/skuinfo/{skuId}/price")
    public R getPrice(@PathVariable("skuId") Long skuId);
}
